@layout("/common/_container.html"){
<div class="row">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>斗鱼主播信息管理</h5>
            </div>
            <div class="ibox-content">
                <div class="row row-lg">
                    <div class="col-sm-12">
                        <div class="row">
                            <div class="col-sm-3">
                                <#NameCon id="condition" name="名称" />
                            </div>
                            <div class="col-sm-3">
                                <#button name="搜索" icon="fa-search" clickFun="UserInfo.search()"/>
                            </div>
                        </div>
                        <div class="hidden-xs" id="UserInfoTableToolbar" role="group">
                            @if(shiro.hasPermission("/userInfo/douyuSpider")){
                            <#button name="启动爬虫" icon="fa-bug" clickFun="UserInfo.spider()" space="true"/>
                            @}
                            @if(shiro.hasPermission("/userInfo/douyuSpider")){
                            <#button name="爬虫日志" id="douyu" icon="fa-clock-o" clickFun="log('douyu')" space="true"/>
                            @}
                        </div>
                        <#table id="UserInfoTable"/>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    // layui.use('layer', function(){
    //     var layer = layui.layer;
    // });
    function log(id){
        // debugger
        // var href = "log.html"
        // var html  = '<iframe src="'+href+'" width="100%" height="100%" scrolling="yes" frameborder="0"></iframe>';
        // layui.element.tabAdd('admin-tab',{
        //     title:'斗鱼爬虫-日志',
        //     content:html,
        //     id:id,
        // });
        // layui.element.tabChange("admin-tab",id);
        layui.use('layer', function(){
            var layer = layui.layer;
            //iframe窗
            // layer.open({
            //     type: 2,
            //     title: false,
            //     closeBtn: 0, //不显示关闭按钮
            //     shade: [0],
            //     area: ['340px', '215px'],
            //     offset: 'rb', //右下角弹出
            //     time: 2000, //2秒后自动关闭
            //     anim: 2,
            //     content: ['test/guodu.html', 'no'], //iframe的url，no代表不显示滚动条
            //     end: function(){ //此处用于演示
            //         layer.open({
            //             type: 2,
            //             title: '斗鱼爬虫-日志',
            //             shadeClose: true,
            //             shade: false,
            //             maxmin: true, //开启最大化最小化按钮
            //             area: ['893px', '600px'],
            //             content: '//fly.layui.com/'
            //         });
            //     }
            // });

            layer.open({
                type: 2,
                title: '斗鱼爬虫-日志',
                shadeClose: true,
                shade: false,
                maxmin: true, //开启最大化最小化按钮
                area: ['893px', '600px'],
                content: '${ctxPath}/userInfo/log'
            });
        });
    }

</script>
<script src="${ctxPath}/static/modular/system/userInfo/userInfo.js"></script>
@}
